package com.wc.AlgoOJ_train.train1.c7.A704;

import java.util.Scanner;

/**
 * @Author congge
 * @Date 2024/1/11 9:56
 * @description 收费站
 * http://43.138.190.70:8888/p/A704
 */
public class Main {
    public static void main(String[] args) {
        int[] dp = new int[31];
        dp[0] = 3;
        for (int i = 1; i <= 30; i++) {
            dp[i] = (dp[i - 1] - 1) * 2;
        }
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        while (n-- > 0){
            int a = sc.nextInt();
            System.out.println(dp[a]);
        }
    }
}
